package com.cy.核心编程.thead.basic.interrupt;


/**
 * interrupt():打断正在睡眠的线程
 */
public class MyThread extends Thread {

    @Override
    public void run() {
        try {
            System.out.println("我开始睡觉了");
            Thread.sleep(10000000);
        } catch (InterruptedException e) {
            System.out.println("为什么不让睡了，醒了");
        }
        System.out.println("工作");
    }
}
